import request from '@/utils/request';
// 企业信息查询
//查询列表接口
export function getQyTableList (params) {
  return request({
    url: '/pollution/wateroutput/list',
    method: 'get',
    params
  })
}

// 新增排口
export function addQyPk (data) {
  return request({
    url: '/pollution/wateroutput/add',
    method: 'post',
    data
  })
}

// 修改排口
export function updateQyPk (data) {
  return request({
    url: '/pollution/wateroutput/edit',
    method: 'post',
    data
  })
}

// 删除排口
export function delQyPk (id) {
  return request({
    url: `/pollution/wateroutput/remove/${id}`,
    method: 'post'
  })
}

// 获取排口详细信息
export function getQyPkDetail (id) {
  return request({
    url: `/pollution/wateroutput/${id}`,
    method: 'get'
  })
}

// 排口监测项查询
export function getQyPkJcx (code) {
  return request({
    url: `/pollution/outputpollutant/listbyoutput/${code}`,
    method: 'get',
  })
}

// 添加监测项
export function addQyPkJcx (data) {
  return request({
    url: '/pollution/wateroutput/additems',
    method: 'post',
    data
  })
}

//修改污染物因子配置
export function updateQyPkJcx (data) {
  return request({
    url: '/pollution/outputpollutant/edit',
    method: 'post',
    data
  })
}


// ----------------------------设备信息·----------------------------

// 设备列表查询
export function getSbTableList (params) {
  return request({
    url: '/base/equipment/list',
    method: 'get',
    params
  })
}

// 新增设备
export function addSb (data) {
  return request({
    url: '/base/equipment/add',
    method: 'post',
    data
  })
}

// 修改设备信息
export function updateSb (data) {
  return request({
    url: '/base/equipment/edit',
    method: 'post',
    data
  })
}

// 删除设备
export function delSb (id) {
  return request({
    url: `/base/equipment/remove/${id}`,
    method: 'post'
  })
}

// 获取设备详细信息
export function getSbDetail (id) {
  return request({
    url: `/base/equipment/${id}`,
    method: 'get'
  })
}

// 企业下拉列表获取
export function getQyList () {
  return request({
    url: '/base/pollutionsource/listall',
    method: 'get'
  })
}

// 排口下拉列表获取
export function getPkList (id) {
  return request({
    url: '/pollution/wateroutput/listall',
    method: 'get',
    params: {
      polluteid: id
    }
  })
}
